//
//  WebView.swift
//  casdon_swiftUI
//
//  Created by ww on 2025/4/5.
//

import SwiftUI
import WebKit

struct WebView: UIViewRepresentable {
    var url: String?

    func makeUIView(context _: Context) -> WKWebView {
        return WKWebView()
    }

    func updateUIView(_ uiView: WKWebView, context _: Context) {
        if let url = URL(string: url ?? "") {
            let request = URLRequest(url: url)
            uiView.load(request)
        }
    }
}
